In networks, data is typically exchanged between communicating devices in the Form of “frames.” Frames include a source MAC (media access control) address and a destination MAC address; a MAC address uniquely identifies a network device in a layer 2 communication protocol used, for example, in Ethernet LANs.
A layer 2 (L2) switch is a switching device which receives packets containing data or control information on one port, and based on the MAC address contained within the packet, switches the packet out another port. The L2 switch generally includes a table that maps MAC addresses with output ports. To facilitate forwarding, the L2 switch may perform MAC address “learning.” MAC address learning refers to a process for reducing network traffic, wherein the source MAC address in a received frame is recorded in an address database along with its port of origin. This allows future frames destined for the source address to be forwarded only to the port on which that address is located.
Learned MAC addresses may be stored in a MAC address table of finite capacity. Typically, once a maximum number of MAC addresses is reached, new entries are not accepted or the earliest stored addresses are overwritten with new information. To avoid rejection of new entries or overwriting, an aging period may be defined for each MAC table entry so that unused MAC addresses are discarded to create space for new information. This aging period may be considered the maximum time during which an entry in the MAC address table is valid.
In a typical L2 switch with a single central processing unit (CPU) or center point, the CPU can age out a MAC address if there is no activity for the duration of the aging period.
However, for multi-CPU switches, the MAC learning/aging function and MAC forwarding function may be distributed among multiple CPUs. Thus, if a MAC entry ages out at one learning CPU, the other CPUs must first be consulted before the entry may be deleted. Thus, the MAC address learning/aging functions in a distributed multi-CPU L2 switch may require an undesirable amount of internal message traffic.